package com.shop.resource.controller;

import com.shop.resource.api.IEmailApi;
import com.shop.resource.service.IEmailService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Description:
 *
 * @author zhoulk
 * @date: 2019年05月08日  17:32
 */

@RestController
public class EmailController implements IEmailApi {

    private static final Logger logger = LoggerFactory.getLogger(EmailController.class);

    @Autowired
    IEmailService emailService;

    @Override
    public Map<String, Object> sendEmailCode(String code, String email) {
        logger.info("发送邮件验证码   code:"+code+" -- email:"+email);
        return emailService.sendEmailCode(code,email);
    }
}
